package cn.gson.school.dao.jiaoxue;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import cn.gson.school.entity.jiaoxue.ChapterEntity;

@Repository
public interface ZhangJieDao extends CrudRepository<ChapterEntity, Long>{

	List<ChapterEntity> findByPhaseId(Long id);
	
	List<ChapterEntity> findByDelete(Integer delete);
	
	@Query(value="from ChapterEntity where chapter_name=? and phase_id=?")
	ChapterEntity findByChapterNameAndPhaseId (String chapterName,Long phaseId);
}
